package com.gqb.nio;

import java.nio.IntBuffer;

import com.sun.org.apache.bcel.internal.generic.NEW;

public class nioBuffer {
	public static void main(String[] args) {
		IntBuffer intBuffer=IntBuffer.allocate(8);
		for (int i = 0; i < intBuffer.capacity(); i++) {
			int j=(i+1)*2;
			intBuffer.put(j);
		}
		intBuffer.flip();
		while(intBuffer.hasRemaining()){
			int j=intBuffer.get();
			System.out.print(j+" ");
		}
	}
}
